return rte_head;
}
-void
+static void
any_route_free(route_head *rte)
{
if ( rte->rte_name ) {
}
-void
+static void
any_route_add_head( route_head *rte, queue *head ) {
ENQUEUE_TAIL( head, &rte->Q );
}
-void
+static void
any_route_del_head( route_head *rte ) {
dequeue( &rte->Q );
any_route_free( rte );
return common_route_by_name(&my_track_head, name);
}
-void
+static void
any_route_add_wpt(route_head *rte, waypoint *wpt, int *ct, int synth )
{
ENQUEUE_TAIL(&rte->waypoint_list, &wpt->Q);
return NULL;
}
-void
+static void
any_route_del_wpt( route_head *rte, waypoint *wpt, int *ct)
{
dequeue( &wpt->Q );
}
}
-void
+static void
common_disp_all(queue *qh, route_hdr rh, route_trl rt, waypt_cb wc)
{
queue *elem, *tmp;
trk_waypts++;
}
-void
+static void
common_restore_finish(void)
{
rte_head_ct = 0;
common_restore_finish();
}
+/*
+ * Move the entire track queue onto the route queue making no attempt
+ * at all to "fix" anything in the process.
+ */
+void
+routes_to_tracks(void)
+{
+ queue *elem, *tmp;
+
+ QUEUE_FOR_EACH(&my_route_head, elem, tmp) {
+ route_head *trk = (route_head *) elem;
+ dequeue(&trk->Q);
+ ENQUEUE_TAIL(&my_track_head, &trk->Q);
+ }
+}
+
+/*
+ * Same, but in opposite direction.
+ */
+void
+tracks_to_routes(void)
+{
+ queue *elem, *tmp;
+
+ QUEUE_FOR_EACH(&my_track_head, elem, tmp) {
+ route_head *trk = (route_head *) elem;
+ dequeue(&trk->Q);
+ ENQUEUE_TAIL(&my_route_head, &trk->Q);
+ }
+}
+
+
/*
* This really makes more sense for tracks than routes.
* Run over all the trackpoints, computing heading (course), speed, and